Optimal. Leaf size=30 \[ \frac{(a+b) \tanh (c+d x)}{d}-\frac{b \tanh ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0402439, antiderivative size = 43, normalized size of antiderivative = 1.43, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4046, 3767, 8} \[ \frac{(3 a+2 b) \tanh (c+d x)}{3 d}+\frac{b \tanh (c+d x) \text{sech}^2(c+d x)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4046
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int \text{sech}^2(c+d x) \left (a+b \text{sech}^2(c+d x)\right ) \, dx &=\frac{b \text{sech}^2(c+d x) \tanh (c+d x)}{3 d}+\frac{1}{3} (3 a+2 b) \int \text{sech}^2(c+d x) \, dx\\ &=\frac{b \text{sech}^2(c+d x) \tanh (c+d x)}{3 d}+\frac{(i (3 a+2 b)) \operatorname{Subst}(\int 1 \, dx,x,-i \tanh (c+d x))}{3 d}\\ &=\frac{(3 a+2 b) \tanh (c+d x)}{3 d}+\frac{b \text{sech}^2(c+d x) \tanh (c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.0116299, size = 39, normalized size = 1.3 \[ \frac{a \tanh (c+d x)}{d}-\frac{b \tanh ^3(c+d x)}{3 d}+\frac{b \tanh (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.019, size = 34, normalized size = 1.1 \begin{align*}{\frac{1}{d} \left ( a\tanh \left ( dx+c \right ) +b \left ({\frac{2}{3}}+{\frac{ \left ({\rm sech} \left (dx+c\right ) \right ) ^{2}}{3}} \right ) \tanh \left ( dx+c \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.04349, size = 151, normalized size = 5.03 \begin{align*} \frac{4}{3} \, b{\left (\frac{3 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d{\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}} + \frac{1}{d{\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}}\right )} + \frac{2 \, a}{d{\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.92377, size = 427, normalized size = 14.23 \begin{align*} -\frac{4 \,{\left ({\left (3 \, a + b\right )} \cosh \left (d x + c\right )^{2} - 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) +{\left (3 \, a + b\right )} \sinh \left (d x + c\right )^{2} + 3 \, a + 3 \, b\right )}}{3 \,{\left (d \cosh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + d \sinh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right )^{2} + 2 \,{\left (3 \, d \cosh \left (d x + c\right )^{2} + 2 \, d\right )} \sinh \left (d x + c\right )^{2} + 4 \,{\left (d \cosh \left (d x + c\right )^{3} + d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + 3 \, d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \operatorname{sech}^{2}{\left (c + d x \right )}\right ) \operatorname{sech}^{2}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.36054, size = 82, normalized size = 2.73 \begin{align*} -\frac{2 \,{\left (3 \, a e^{\left (4 \, d x + 4 \, c\right )} + 6 \, a e^{\left (2 \, d x + 2 \, c\right )} + 6 \, b e^{\left (2 \, d x + 2 \, c\right )} + 3 \, a + 2 \, b\right )}}{3 \, d{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]